<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
    <script src="js/axios-0.18.0.js"></script>
</head>

<body>
    <div id="app">
        <input type="button" value="发送get请求" @click="get()">
        <input type="button" value="发送post请求" @click="post()">

    </div>

</body>

</html>
<script>
    new Vue({
        el: '#app',
        data() {
            return {

            }
        },
        methods: {
            get() {


                //get
                axios.get("http://localhost:10010/emp/list").then(resp => {
                    console.log(resp.data.data);
                });

            },
            post() {
                //post
                axios.post('http://localhost:10010/emp/deleteById', "id = 1").then(resp => {
                    console.log(resp.data);
                });

                // axios.put()  axios.delete()
            }
        }
    });
</script>